<script type="text/javascript">

//   jQuery(document).ready(function(){
//     jQuery('#cropbox').Jcrop({
//       onChange: showCoords,
//       onSelect: showCoords
//     });
    
//   });

//   // Simple event handler, called from onChange and onSelect
//   // event handlers, as per the Jcrop invocation above
//   function showCoords(c)
//   {
//     jQuery('#x1').val(c.x);
//     jQuery('#y1').val(c.y);
//     jQuery('#w').val(c.w);
//     jQuery('#h').val(c.h);
//   };

</script>

<!-- <div class="article"> -->

  <%# @hotel = Hotel.find(45) %>
  <!-- <h1>Jcrop - Event Handlers</h1> -->
  <!-- This is the image we're attaching Jcrop to -->
  
  <%#= image_tag @hotel.primary_picture.url(:large), id: "cropbox" %>

  <!-- <h4>Preview</h4>
  <div style="width:100px; height:100px; overflow:hidden">
    <%#= image_tag @hotel.primary_picture.url(:large), :id => "preview" %>
  </div> -->
  <!-- This is the form that our event handler fills -->
  <%#= form_for @hotel, :html => {remote: true, id: "form_hotel" } do |form| %>
    <%# for attribute in [:x1, :x2, :y1, :y2, :w, :h] %>
      <%#= form.text_field attribute, :id => attribute %>
    <%# end %>
    <!-- <p><%#= form.submit "Crop" %></p> -->
  <%# end %>

<!-- </div> -->




<h1>Thank You and Welcome From Bali Fantastico</h1>
<h2>Click <%= link_to 'Here',  hotels_path({ user_id: session[:user_id] }), remote: true %> to back to hotel</h2>